BTree template definition. More...
#include <tbtree.h>
Public Member Functions | |
TBTree (int32=3) | |
Default tree constructor. | |
TBTree (const TBTree< T > &) | |
Tree copy constructor. | |
TBTree (const TContainer< T > &) | |
Construct from container. | |
~TBTree () | |
Tree destructor. | |
TContainer< T > * | newInstance () const |
TBTree< T > & | operator= (const TBTree< T > &) |
Assignment operator. | |
int32 | order () const |
Return tree order. | |
int32 | height () const |
Return tree height. | |
virtual bool | add (const T &) |
Add item to tree. | |
virtual bool | remove (const T &) |
Remove item from tree. | |
virtual bool | remove (const TIterator< T > &) |
Remove iterator item. | |
virtual bool | removeAt (int32) |
Remove at index. | |
virtual void | removeAll () |
Remove all items. | |
virtual T & | lookup (const T &) const |
Find equal item in tree. | |
bool | lookup (const T &, TBTreeIterator< T > &) |
bool | lookupLowerEqual (const T &, TBTreeIterator< T > &) |
virtual bool | contains (const T &) const |
See if tree contains equal. | |
virtual int32 | occurrences (const T &) const |
Count occurrences of equal. | |
TIterator< T > * | lookupIterator (const T &) const |
TIterator< T > * | newIterator () const |
Create tree iterator. |
BTree template definition.
Template definition for a BTree
TBTree | ( | int32 | ordr = 3 |
) | [inline] |
Default tree constructor.
TBTree | ( | const TContainer< T > & | cont | ) | [inline] |
Construct from container.
~TBTree | ( | ) | [inline] |
Tree destructor.
TContainer< T > * newInstance | ( | ) | const [inline, virtual] |
Implements TContainer< T >.
Assignment operator.
Reimplemented in TBTreeSet< T >.
int32 order | ( | ) | const [inline] |
Return tree order.
int32 height | ( | ) | const [inline] |
Return tree height.
bool add | ( | const T & | rObj | ) | [inline, virtual] |
bool remove | ( | const T & | rObj | ) | [inline, virtual] |
Remove item from tree.
Implements TContainer< T >.
bool remove | ( | const TIterator< T > & | iter | ) | [inline, virtual] |
Remove iterator item.
Implements TContainer< T >.
bool removeAt | ( | int32 | idx | ) | [inline, virtual] |
Remove at index.
Implements TContainer< T >.
void removeAll | ( | ) | [inline, virtual] |
Remove all items.
Implements TContainer< T >.
T & lookup | ( | const T & | rObj | ) | const [inline, virtual] |
Find equal item in tree.
Reimplemented from TContainer< T >.
bool lookup | ( | const T & | rObj, | |
TBTreeIterator< T > & | iter | |||
) | [inline] |
bool lookupLowerEqual | ( | const T & | rObj, | |
TBTreeIterator< T > & | iter | |||
) | [inline] |
bool contains | ( | const T & | rObj | ) | const [inline, virtual] |
See if tree contains equal.
Reimplemented from TContainer< T >.
int32 occurrences | ( | const T & | rObj | ) | const [inline, virtual] |
Count occurrences of equal.
Reimplemented from TContainer< T >.
TIterator< T > * lookupIterator | ( | const T & | rObj | ) | const [inline] |
TIterator< T > * newIterator | ( | ) | const [inline, virtual] |
Create tree iterator.
Implements TContainer< T >.